#include <qtextview.h>
#include <stdio.h>
#include <iostream>
#define phoneticHead "<font face=syt color=\"#0000FF\">["
#define phoneticTail "]</font>"
static QChar Trans2Unicode(const QChar &ch)
{
	//printf("%0x ",ch.unicode());
	switch(ch)
	{
		case 0x04://star
			return 0x0251;
		case 0x03://as
			return 0x00E6;
		case 0x0f://just2
			return 0x028C;
		case 0x10://air2
			return 0x0259;
		case 0x06://tall
			return 0x0254;
		case 0x1d://fresh
			return 0x0283;
		case 0x1c://this
			return 0x03B8;
		case 0x0b://thread
			return 0x00F0;
		case 0x02://air 1
			return 0x025B;
		case 0x1e://just 1
			return 0x0292;
		case 0x19://link
			return 0x014B;
                case 0x1f://ci zhong
                        return 0x02cc;
                case 0x0e://another u
                        return 'u';
		//case 0x3a://long
		//	return 0x02D0;
		case 0x01://I
			return 0x026a;
		default:
			return ch;
	}
}
class MyMultiLineEdit : public QTextView{
 Q_OBJECT
public:
	MyMultiLineEdit( QWidget *parent=0, const char *name=0):QTextView(parent, name)
	{
		enableClipper(true);
	};
	MyMultiLineEdit( QWidget *parent,bool EZXStyle,int lines = 1,const char *name=0 ):QTextView(parent, name)
	{
	};
	void setText ( const QString & text );
private:
	QString tmpStr;
protected:
//	void viewportMousePressEvent(QMouseEvent *e);
	void viewportMouseReleaseEvent(QMouseEvent *e);
	void keyPressEvent(QKeyEvent *e);
};
